package com.zhouyu.exampleboot.config.event;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.context.WebApplicationContext;

@Component
public class MyEventPusher {
    @Autowired
    private WebApplicationContext webApplicationContext;

    public void pushMyevent(){
        MyEvent event = new MyEvent("obj", "zhouyu");
        webApplicationContext.publishEvent(event);
    }
}
